<extend name="./Application/Admin/View/Layout/application.html"/>

<block name="css">
    <!--下拉框搜索插件-->
    <link rel="stylesheet" href="__PUBLIC__/vendor/select2/css/select2.min.css">
    <!--颜色提取-->
    <link rel="stylesheet" href="__PUBLIC__/vendor/">

</block>


<block name="content">
    <!--content start-->
    <div class="col-sm-9">
        <div class="panel panel-primary">
            <div class="panel-heading">
                <h1 class="panel-title">增加栏目</h1>
            </div>
            <div class="panel-body">
                <!-- TAB NAVIGATION -->
                <ul class="nav nav-tabs" role="tablist">
                    <li class="active"><a href="#tab1" role="tab" data-toggle="tab">文章信息</a></li>
                    <li><a href="#tab2" role="tab" data-toggle="tab">文章内容</a></li>
                </ul>
                <!-- TAB CONTENT -->
                <form class="form-horizontal" action="{{:U('add')}}" method="post">
                    <div class="tab-content">

                        <div role="tabpanel" class="active tab-pane fade in" id="tab1">
                            <div class="form-group">
                                <label class="col-sm-3 control-label">所属栏目</label>
                                <div class="col-sm-5">
                                    <select class="form-control" name="category_id">
                                        <option>请选择</option>
                                        <volist name="cates" id="cate">
                                            <option value="{{$cate.id}}">{{$cate.name}}</option>
                                        </volist>
                                    </select>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">标题</label>
                                <div class="col-sm-5">
                                    <input type="text" name="title" class="form-control" placeholder="title">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">颜色</label>
                                <div class="col-sm-5">
                                    <div id="cp2" class="input-group colorpicker-component">
                                        <input type="text" name="color" value="#00AABB" class="form-control"/>
                                        <span class="input-group-addon"><i></i></span>
                                    </div>
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">发布日期</label>
                                <div class="col-sm-5">
                                    <input type="text" name="time" id="time" class="form-control" placeholder="time">
                                </div>
                            </div>
                            <!--缩略图-->
                            <div class="form-group">
                                <label class="col-sm-3 control-label">缩略图</label>
                                <div class="col-sm-5">
                                    <input type="text" name="thumb" id="thumb" class="form-control" placeholder="thumb">
                                </div>
                                <div class="col-sm-2">
                                    <input type="button" value="上 传" id="ck_thumb_upload" class="btn btn-success"/>
                                </div>
                            </div>
                            <div class="form-group">
                                <div class="col-sm-offset-3 col-sm-8">
                                    <img src="" id="img_show" width="90px" height="90px"/>
                                </div>
                            </div>

                            <!--附件上传-->
                            <div class="form-group">
                                <label class="col-sm-3 control-label">附件上传</label>
                                <div class="col-sm-5">
                                    <input type="button" id="add_file" class="btn btn-success" value="增 加">
                                </div>
                            </div>

                            <div id="files">
                                <div class="form-group">
                                    <label class="col-sm-3 control-label">附件(1)</label>
                                    <div class="col-sm-5">
                                        <input type="text" id="file1" class="form-control" name="file[]">
                                    </div>
                                    <div class="col-sm-3">
                                        <input type="button" value="上 传" onclick="ck_file_upload('file1')" class="btn btn-success">
                                        <input type="button" value="删 除" class="empty_file btn btn-success">
                                    </div>
                                </div>
                            </div>

                            <div class="form-group">
                                <label class="col-sm-3 control-label">摘要</label>
                                <div class="col-sm-5">
                                    <input type="text" name="description" class="form-control"
                                           placeholder="description">
                                </div>
                            </div>
                            <div class="form-group">
                                <label class="col-sm-3 control-label">排序</label>
                                <div class="col-sm-5">
                                    <input type="text" name="sort_order" class="form-control"
                                           placeholder="sort_order">
                                </div>
                            </div>
                        </div>

                        <div class="tab-pane fade" id="tab2">
                            <textarea name="content" id="content" cols="30" rows="10"></textarea>
                        </div>
                    </div>
                    <div class="form-group">
                        <div class="col-sm-12">
                            <button type="submit" class="btn btn-primary">添 加</button>
                        </div>
                    </div>
                </form>
            </div>
        </div>
    </div>
</block>
